package cz.muni.fi.veles.maps;

import cz.muni.fi.veles.MapServer;
import org.richfaces.cdk.annotations.Attribute;
import org.richfaces.cdk.annotations.Description;
import org.richfaces.cdk.annotations.JsfComponent;
import org.richfaces.cdk.annotations.JsfRenderer;

/**
 * Implementation of map component for Bing Maps server
 * @author Jan Ferko
 */
@JsfComponent(family=AbstractMap.COMPONENT_FAMILY,
    type=BingMap.COMPONENT_TYPE,
    description=@Description(displayName="bing"),
    renderer=@JsfRenderer(family=AbstractMap.COMPONENT_FAMILY, type="cz.muni.fi.veles.BingMapRenderer"))
public abstract class BingMap extends AbstractMap{
    public static final String COMPONENT_TYPE = "cz.muni.fi.veles.BingMap";

    /**
     * Required attribute
     * @return  credentials key of map owner
     */
    @Attribute(required=true)
    public abstract String getCredentials();

    /**
     * Default value: {@code true}
     * @return indicator if dashboard panel is enabled
     */
    @Attribute(defaultValue="true")
    public abstract boolean isDashboard();

    /**
     * Default value: {@code true}
     * @return indicator if map type control is enabled
     */
    @Attribute(defaultValue="true")
    public abstract boolean isMapTypeControl();

    /**
     * Default value: {@code false}
     * @return indicator if scalebar is enabled
     */
    @Attribute(defaultValue="false")
    public abstract boolean isScalebar();
    
    /**
     * Return Bing map server type
     * @return {@link MapServer#BING}
     */
    @Override
    public final MapServer getMapServer(){
        return MapServer.BING;
    }
}
